package com.apes.fn.fico.reimbursement.repository;

import com.apes.fn.fico.reimbursement.model.FeeType;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by lishikun on 2021/1/27 18:50
 */
public interface FeeTypeRepository extends CustomRepository<FeeType, String> {

    @Query(value = "select A.* FROM fn_fee_type A WHERE (A.id LIKE %:id% OR A.name LIKE %:name%) AND A.VALID = 1 ORDER BY A.ID",nativeQuery = true)
    List<FeeType> findByFilterMapAndReimbursementMark(@Param("id") String id ,@Param("name") String name);

}
